<%@page contentType="text/html" language="java"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="common/tag.jsp"%>
<!DOCTYPE html>
<html>
    <head>
        <title>秒杀列表</title>
        <%@include file="common/head.jsp"%>
    </head>
    <body>
    	<div class="container">
			<div class="panel panel-default">
			  <div class="panel-heading">
			    <h3 class="panel-title">秒杀列表</h3>
			    <h2>${pageContext.request.contextPath}</h2>
			   
			  <%--  <%
			   String path = request.getContextPath();  
			    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()  
			            + path;  
			   %>
			   <h2><%= basePath%></h2> --%>
			  </div>
			  <div class="panel-body">
			  		<table class="table table-hover">
			  			<thead>
			  				<th>名称</th>
			  				<th>库存</th>
			  				<th>开始时间</th>
			  				<th>结束时间</th>
			  				<th>创建时间</th>
			  				<th>详情页</th>
			  			</thead>
			  			<tbody>
			  				<c:forEach var="sk" items="${list}">
			  					<tr>
			  						<td>${sk.name}</td>
			  						<td>${sk.number}</td>
			  						<td>
			  							 <fmt:formatDate value="${sk.startTime}" pattern="yyyy-MM-dd HH:mm:ss" />
			  						</td>
			  						<td>
			  							<fmt:formatDate value="${sk.endTime}" pattern="yyyy-MM-dd HH:mm:ss" />
			  						</td>
			  						<td>
			  							<fmt:formatDate value="${sk.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
			  						</td>
			  						<td>
			  							<a class="btn btn-info" href="${pageContext.request.contextPath}/seckill/${sk.seckillId}/detail" target="_blank">详情</a>
			  						</td>
			  					</tr>
			  				</c:forEach>
			  			</tbody>
			  		</table>
			  </div>
			</div>
    	</div>
    	
    	
    	<script src="http://apps.bdimg.com/libs/jquery/2.0.0/jquery.min.js"></script>
		<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
		<script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>
 	</body>
</html>